{extend name='admin@main'}

{block name="content"}
<div class="think-box-shadow">
    {include file='$search_url'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>用户</th>
            <th class='text-left nowrap'>会员</th>
            <th class='text-left nowrap'>注册时间</th>
            <th class="text-left" style="width: 20%">操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>
                <img data-tips-image style="width:50px;height:50px" src="{$vo.headimg|default=''}" class="margin-right-5 text-top">
                <div class="inline-block">
                    用户ID：{$vo.id|default='--'}<br>
                    用户昵称：{$vo.name|default='--'}
                </div>
            </td>
            <td class='text-left nowrap'>
                <div class="inline-block">
                    会员等级：{$vo.level_id|default='--'}<br>
                    等级名称：{$vo.level_name|default='--'}<br>
                </div>
            </td>
            <td class='text-left'>{$vo.create_at}</td>
            <td class='text-left nowrap'>
                {if $vo.status eq 1 and auth("forbid")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0">禁 用</a>
                {elseif auth("resume")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>
                {/if}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该用户吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
